import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'frp_http_proxy_method_channel.dart';
import 'proxy.dart';

abstract class FrpHttpProxyPlatform extends PlatformInterface {
  /// Constructs a FrpHttpProxyPlatform.
  FrpHttpProxyPlatform() : super(token: _token);

  static final Object _token = Object();

  static FrpHttpProxyPlatform _instance = MethodChannelFrpHttpProxy();

  /// The default instance of [FrpHttpProxyPlatform] to use.
  ///
  /// Defaults to [MethodChannelFrpHttpProxy].
  static FrpHttpProxyPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [FrpHttpProxyPlatform] when
  /// they register themselves.
  static set instance(FrpHttpProxyPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<String?> run(Proxy params) {
    throw UnimplementedError('run() has not been implemented.');
  }

  Future<String?> downApp(String pid) {
    throw UnimplementedError('downApp() has not been implemented.');
  }

  Future<Map<String, dynamic>?> getServiceStatus() {
    throw UnimplementedError('getServiceStatus() has not been implemented.');
  }
}
